Bug 1331795: pdfjs test, switch selector to use page number attribute r=RyanVM,yury
authordhouse@mozilla.com
Tue, 17 Jan 2017 16:39:12 -0700
changeset 377182 5999113009c35768c32afa8dd64f6411c448b05f
parent 377181 59d503b1f67e32ac05d83298ef442e3a12fe6c2c
child 377183 280836582bde2dbc2f883ffb85f56cfc65c593b0
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersRyanVM, yury
bugs1331795
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1331795: pdfjs test, switch selector to use page number attribute r=RyanVM,yury MozReview-Commit-ID: OcTp2EOMc5
browser/extensions/pdfjs/test/browser_pdfjs_zoom.js
--- a/browser/extensions/pdfjs/test/browser_pdfjs_zoom.js
+++ b/browser/extensions/pdfjs/test/browser_pdfjs_zoom.js
@@ -93,17 +93,17 @@ add_task(function* test() {
         }
 
         // check that PDF is opened with internal viewer
         Assert.ok(content.document.querySelector("div#viewer"), "document content has viewer UI");
         Assert.ok("PDFJS" in content.wrappedJSObject, "window content has PDFJS object");
 
         let initialWidth, previousWidth;
         initialWidth = previousWidth =
-          parseInt(content.document.querySelector("div#pageContainer1").style.width);
+          parseInt(content.document.querySelector('div.page[data-page-number="1"]').style.width);
 
         for (let test of TESTS) {
           // We zoom using an UI element
           var ev;
           if (test.action.selector) {
             // Get the element and trigger the action for changing the zoom
             var el = document.querySelector(test.action.selector);
             Assert.ok(el, "Element '" + test.action.selector + "' has been found");
@@ -128,17 +128,17 @@ add_task(function* test() {
           el.dispatchEvent(ev);
           yield waitForRender();
 
           var pageZoomScale = content.document.querySelector('select#scaleSelect');
 
           // The zoom value displayed in the zoom select
           var zoomValue = pageZoomScale.options[pageZoomScale.selectedIndex].innerHTML;
 
-          let pageContainer = content.document.querySelector('div#pageContainer1');
+          let pageContainer = content.document.querySelector('div.page[data-page-number="1"]');
           let actualWidth = parseInt(pageContainer.style.width);
 
           // the actual zoom of the PDF document
           let computedZoomValue = parseInt(((actualWidth/initialWidth).toFixed(2))*100) + "%";
           Assert.equal(computedZoomValue, zoomValue, "Content has correct zoom");
 
           // Check that document zooms in the expected way (in/out)
           let zoom = (actualWidth - previousWidth) * test.expectedZoom;