mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 19:25:43 +00:00
Bug 1189901: part 1: remove code redundancy between tscrollx and tp5o_scroll. r=jmaher
This commit is contained in:
parent
f84225ca51
commit
cc4bbce3d9
@ -1,9 +1,6 @@
|
||||
// Note: The content from here upto '// End scroll test' is duplicated at:
|
||||
// - talos/tests/scroll/scroll-test.js
|
||||
// - inside talos/pageloader/chrome/tscroll.js
|
||||
//
|
||||
// - Please keep these copies in sync.
|
||||
// - Pleace make sure that any changes apply cleanly to all use cases.
|
||||
// Note: This file is used at both tscrollx and tp5o_scroll. With the former as
|
||||
// unprivileged code.
|
||||
// - Please make sure that any changes apply cleanly to all use cases.
|
||||
|
||||
function testScroll(target, stepSize, opt_reportFunc, opt_numSteps)
|
||||
{
|
||||
@ -121,12 +118,13 @@ function testScroll(target, stepSize, opt_reportFunc, opt_numSteps)
|
||||
rAF(startTest);
|
||||
}, 260);
|
||||
}
|
||||
// End scroll test - End duplicated code
|
||||
|
||||
// This code below here is unique to tscroll.js inside of pageloader
|
||||
function handleMessageFromChrome(message) {
|
||||
var payload = message.data.details;
|
||||
testScroll(payload.target, payload.stepSize, 'PageLoader:RecordTime', payload.opt_numSteps);
|
||||
}
|
||||
try {
|
||||
function handleMessageFromChrome(message) {
|
||||
var payload = message.data.details;
|
||||
testScroll(payload.target, payload.stepSize, 'PageLoader:RecordTime', payload.opt_numSteps);
|
||||
}
|
||||
|
||||
addMessageListener("PageLoader:ScrollTest", handleMessageFromChrome);
|
||||
addMessageListener("PageLoader:ScrollTest", handleMessageFromChrome);
|
||||
} catch (e) {}
|
||||
|
@ -35,5 +35,5 @@
|
||||
<!-- this has to come after the iframe for some reason -->
|
||||
<script type="text/javascript" xlink:href="../../scripts/talos-debug.js"/>
|
||||
<script type="text/javascript" xlink:href="../../scripts/Profiler.js"/>
|
||||
<script type="text/javascript" xlink:href="scroll-test.js"/>
|
||||
<script type="text/javascript" xlink:href="../../pageloader/chrome/tscroll.js"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@ -4,7 +4,7 @@
|
||||
<title>Perf test case</title>
|
||||
<link type="text/css" rel="stylesheet" href="reader.css">
|
||||
<script src="../../scripts/Profiler.js" type="text/javascript"></script>
|
||||
<script src="scroll-test.js" type="text/javascript"></script>
|
||||
<script src="../../pageloader/chrome/tscroll.js" type="text/javascript"></script>
|
||||
<!--
|
||||
This resembles the layout of Google Reader as of 2009-11-23
|
||||
and exposed bug 530686.
|
||||
|
@ -9,7 +9,7 @@
|
||||
}
|
||||
</style>
|
||||
<script src="../../scripts/Profiler.js" type="text/javascript"></script>
|
||||
<script src="scroll-test.js" type="text/javascript"></script>
|
||||
<script src="../../pageloader/chrome/tscroll.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body onload = "testScroll(window, 5)">
|
||||
<P>
|
||||
|
@ -10,7 +10,7 @@
|
||||
}
|
||||
</style>
|
||||
<script src="../../scripts/Profiler.js" type="text/javascript"></script>
|
||||
<script src="scroll-test.js" type="text/javascript"></script>
|
||||
<script src="../../pageloader/chrome/tscroll.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body onload = "testScroll(window, 5)">
|
||||
<P>
|
||||
|
@ -7,7 +7,7 @@
|
||||
}
|
||||
</style>
|
||||
<script src="../../scripts/Profiler.js" type="text/javascript"></script>
|
||||
<script src="scroll-test.js" type="text/javascript"></script>
|
||||
<script src="../../pageloader/chrome/tscroll.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body onload = "testScroll(window, 5)">
|
||||
<P>
|
||||
|
@ -6,7 +6,7 @@
|
||||
}
|
||||
</style>
|
||||
<script src="../../scripts/Profiler.js" type="text/javascript"></script>
|
||||
<script src="scroll-test.js" type="text/javascript"></script>
|
||||
<script src="../../pageloader/chrome/tscroll.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body onload = "testScroll(window, 5)">
|
||||
<P>
|
||||
|
Loading…
Reference in New Issue
Block a user