Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- force-enable-autosizing() {
- if grep -xq '#if HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP' Source/core/page/Settings.cpp; then
- sed -i 's/#if HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP/#if 1\/\/HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP/' Source/core/page/Settings.cpp
- fi
- }
- real-world-impact() {
- # Set these variables
- local CHROMIUM_ROOT=/usr/local/google/home/$USER/chromium/src
- local NUM_SITES=100
- local from=master
- if [[ -n $2 ]]; then
- from="$1"
- shift
- fi
- local to="$1"
- cd $CHROMIUM_ROOT/third_party/WebKit &&
- if git show-ref --verify --quiet refs/heads/impact-before; then
- git checkout master
- git branch -D impact-before
- fi &&
- if git show-ref --verify --quiet "refs/heads/$from"; then
- gch -t -b impact-before "$from"
- else
- echo "Error: branch '$from' no found"
- return 1
- fi &&
- force-enable-autosizing &&
- git commit -a -m 'patch + hack' # no &&, as returns 1 if nothing to commit
- cd $CHROMIUM_ROOT &&
- cr build blink_tests &&
- cd $CHROMIUM_ROOT/third_party/WebKit &&
- # Run twice to reduce timing issues from it not being cached in RAM.
- $CHROMIUM_ROOT/tools/real_world_impact/real_world_impact.py before $NUM_SITES &&
- $CHROMIUM_ROOT/tools/real_world_impact/real_world_impact.py before $NUM_SITES &&
- if git show-ref --verify --quiet refs/heads/impact-after; then
- git branch -D impact-after
- fi &&
- if git show-ref --verify --quiet "refs/heads/$to"; then
- gch -t -b impact-after "$to"
- else
- echo "Error: branch '$to' no found"
- return 1
- fi &&
- force-enable-autosizing &&
- git commit -a -m 'patch + hack' &&
- cd $CHROMIUM_ROOT &&
- cr build blink_tests &&
- cd $CHROMIUM_ROOT/third_party/WebKit &&
- $CHROMIUM_ROOT/tools/real_world_impact/real_world_impact.py after $NUM_SITES &&
- $CHROMIUM_ROOT/tools/real_world_impact/real_world_impact.py compare $NUM_SITES
- }
Advertisement
Add Comment
Please, Sign In to add comment