forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extensions Web UI: Use HTML Imports Polyfill
Bug: 925517 Change-Id: I0686f2462cfd8d4b1c7f03d677b890fb1345880f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1579324 Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org> Cr-Commit-Position: refs/heads/master@{#656614}
- Loading branch information
rbpotter
authored and
Commit Bot
committed
May 4, 2019
1 parent
8c63064
commit e29836b
Showing
13 changed files
with
148 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2019 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
/** @fileoverview Suite of tests for the extensions error console. */ | ||
suite('CrExtensionsErrorConsoleTest', function() { | ||
const STACK_ERRORS = 'li'; | ||
const ACTIVE_ERROR_IN_STACK = 'li[tabindex="0"]'; | ||
|
||
// Initialize an extension activity log item before each test. | ||
setup(function() { | ||
return test_util.waitForRender(document); | ||
}); | ||
|
||
test('TestUpDownErrors', function() { | ||
let initialFocus = | ||
extension_test_util.findMatches(document, ACTIVE_ERROR_IN_STACK)[0]; | ||
assertTrue(!!initialFocus); | ||
assertEquals( | ||
1, | ||
extension_test_util.findMatches(document, ACTIVE_ERROR_IN_STACK) | ||
.length); | ||
assertEquals( | ||
4, extension_test_util.findMatches(document, STACK_ERRORS).length); | ||
|
||
// Pressing up when the first item is focused should NOT change focus. | ||
MockInteractions.keyDownOn(initialFocus, 38, '', 'ArrowUp'); | ||
assertEquals( | ||
initialFocus, | ||
extension_test_util.findMatches(document, ACTIVE_ERROR_IN_STACK)[0]); | ||
|
||
// Pressing down when the first item is focused should change focus. | ||
MockInteractions.keyDownOn(initialFocus, 40, '', 'ArrowDown'); | ||
assertNotEquals( | ||
initialFocus, | ||
extension_test_util.findMatches(document, ACTIVE_ERROR_IN_STACK)[0]); | ||
|
||
// Pressing up when the second item is focused should focus the first again. | ||
MockInteractions.keyDownOn(initialFocus, 38, '', 'ArrowUp'); | ||
assertEquals( | ||
initialFocus, | ||
extension_test_util.findMatches(document, ACTIVE_ERROR_IN_STACK)[0]); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<meta charset="utf-8"> | ||
<script src="chrome://resources/polymer/v1_0/html-imports/html-imports.min.js"> | ||
</script> | ||
<script src="subpage_loader.js"></script> |