Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1284)

Side by Side Diff: chrome/test/data/pdf/basic_test_material.js

Issue 1162863002: Material PDF: Fix inconsistent behaviour in page selector, update styling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase mistake Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/pdf/pdf.js ('k') | pdf/out_of_process_instance.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var tests = [ 5 var tests = [
6 /** 6 /**
7 * Test that some key elements exist and that they have the appropriate 7 * Test that some key elements exist and that they have the appropriate
8 * constructor name. This verifies that polymer is working correctly. 8 * constructor name. This verifies that polymer is working correctly.
9 */ 9 */
10 function testHasElements() { 10 function testHasElements() {
(...skipping 18 matching lines...) Expand all
29 * Test that the plugin element exists and is navigated to the correct URL. 29 * Test that the plugin element exists and is navigated to the correct URL.
30 */ 30 */
31 function testPluginElement() { 31 function testPluginElement() {
32 var plugin = document.getElementById('plugin'); 32 var plugin = document.getElementById('plugin');
33 chrome.test.assertEq('embed', plugin.localName); 33 chrome.test.assertEq('embed', plugin.localName);
34 34
35 chrome.test.assertTrue( 35 chrome.test.assertTrue(
36 plugin.getAttribute('src').indexOf('/pdf/test.pdf') != -1); 36 plugin.getAttribute('src').indexOf('/pdf/test.pdf') != -1);
37 chrome.test.succeed(); 37 chrome.test.succeed();
38 }, 38 },
39
40 /**
41 * Test that shouldIgnoreKeyEvents correctly searches through the shadow DOM
42 * to find input fields.
43 */
44 function testIgnoreKeyEvents() {
45 // Test that the traversal through the shadow DOM works correctly.
46 var toolbar = document.getElementById('material-toolbar');
47 toolbar.$.pageselector.$.input.focus();
48 chrome.test.assertTrue(shouldIgnoreKeyEvents(toolbar));
49
50 // Test case where the active element has a shadow root of its own.
51 toolbar.$.buttons.children[0].focus();
52 chrome.test.assertFalse(shouldIgnoreKeyEvents(toolbar));
53
54 chrome.test.assertFalse(
55 shouldIgnoreKeyEvents(document.getElementById('plugin')));
56
57 chrome.test.succeed();
58 }
39 ]; 59 ];
40 60
41 chrome.test.runTests(tests); 61 var scriptingAPI = new PDFScriptingAPI(window, window);
62 scriptingAPI.setLoadCallback(function() {
63 chrome.test.runTests(tests);
64 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/pdf/pdf.js ('k') | pdf/out_of_process_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698