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

Unified Diff: chrome/test/data/webui/media_router/media_router_header_tests.js

Issue 1834573002: [Media Router WebUI] Handle header height changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/webui/media_router/media_router_header_tests.js
diff --git a/chrome/test/data/webui/media_router/media_router_header_tests.js b/chrome/test/data/webui/media_router/media_router_header_tests.js
index 0df37f80b397b0332f5c5d06504ba355fa8f253a..cd9812629c8357d3a3338a62cc532bf35a9429eb 100644
--- a/chrome/test/data/webui/media_router/media_router_header_tests.js
+++ b/chrome/test/data/webui/media_router/media_router_header_tests.js
@@ -148,15 +148,30 @@ cr.define('media_router_header', function() {
});
// Tests for 'header-height-changed' event firing when the header changes
- // if email is shown.
+ // and the email is shown.
test('header height changed with email shown', function(done) {
header.addEventListener('header-height-changed', function() {
+ assertEquals(header.headerWithEmailHeight_, header.offsetHeight);
done();
});
header.userEmail = 'user@example.com';
header.showEmail = true;
});
+ // Test for 'header-height-changed' event firing when the header changes
+ // and the email is not shown.
+ test('header height changed without email shown', function(done) {
+ header.userEmail = 'user@example.com';
+ header.showEmail = true;
+ setTimeout(function() {
+ header.addEventListener('header-height-changed', function() {
+ assertEquals(header.headerWithoutEmailHeight_, header.offsetHeight);
+ done();
+ });
+ header.showEmail = false;
+ });
+ });
+
// Tests the |computeArrowDropIcon_| function.
test('compute arrow drop icon', function() {
assertEquals('arrow-drop-up',

Powered by Google App Engine
This is Rietveld 408576698