Commit afbeb81b authored by dstockwell's avatar dstockwell Committed by Commit Bot

pdf: Prepare tests for enabling annotations feature

Bug: 902646
Change-Id: I69015588df66c1d80817c141580f9fc29b248ece
Reviewed-on: https://chromium-review.googlesource.com/c/1482354
Commit-Queue: dstockwell <dstockwell@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Auto-Submit: dstockwell <dstockwell@chromium.org>
Reviewed-by: default avatarDarren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634554}
parent 00369d41
......@@ -5,8 +5,11 @@
chrome.test.runTests([
function testAnnotationsDisabled() {
const toolbar = document.body.querySelector('#toolbar');
chrome.test.assertFalse(toolbar.pdfAnnotationsEnabled);
chrome.test.assertEq(null, toolbar.shadowRoot.querySelector('#annotate'));
if (toolbar.pdfAnnotationsEnabled) {
chrome.test.assertTrue(!!toolbar.shadowRoot.querySelector('#annotate'));
} else {
chrome.test.assertFalse(!!toolbar.shadowRoot.querySelector('#annotate'));
}
chrome.test.succeed();
},
]);
......@@ -45,7 +45,7 @@ var tests = [
chrome.test.assertTrue(shouldIgnoreKeyEvents(toolbar));
// Test case where the active element has a shadow root of its own.
toolbar.$.buttons.children[1].focus();
toolbar.$['rotate-right'].focus();
chrome.test.assertFalse(shouldIgnoreKeyEvents(toolbar));
chrome.test.assertFalse(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment