| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "chrome/test/ui/ui_test.h" | 5 #include "chrome/test/ui/ui_test.h" |
| 6 | 6 |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "chrome/app/chrome_dll_resource.h" | 8 #include "chrome/app/chrome_dll_resource.h" |
| 9 #include "chrome/browser/dom_ui/new_tab_ui.h" | 9 #include "chrome/browser/dom_ui/new_tab_ui.h" |
| 10 #include "chrome/browser/json_pref_store.h" | 10 #include "chrome/browser/json_pref_store.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 L")", | 140 L")", |
| 141 &tip_text_content)); | 141 &tip_text_content)); |
| 142 ASSERT_EQ(L"", tip_text_content); | 142 ASSERT_EQ(L"", tip_text_content); |
| 143 | 143 |
| 144 // Make sure that the notification is visible | 144 // Make sure that the notification is visible |
| 145 bool has_class; | 145 bool has_class; |
| 146 ASSERT_TRUE(tab->ExecuteAndExtractBool(L"", | 146 ASSERT_TRUE(tab->ExecuteAndExtractBool(L"", |
| 147 L"window.domAutomationController.send(" | 147 L"window.domAutomationController.send(" |
| 148 L"(function() {" | 148 L"(function() {" |
| 149 L" var el = document.querySelector('#notification');" | 149 L" var el = document.querySelector('#notification');" |
| 150 L" return hasClass(el, 'show');" | 150 L" return el.classList.contains('show');" |
| 151 L"})()" | 151 L"})()" |
| 152 L")", | 152 L")", |
| 153 &has_class)); | 153 &has_class)); |
| 154 ASSERT_TRUE(has_class); | 154 ASSERT_TRUE(has_class); |
| 155 | 155 |
| 156 bool is_home_page; | 156 bool is_home_page; |
| 157 ASSERT_TRUE(browser->GetBooleanPreference(prefs::kHomePageIsNewTabPage, | 157 ASSERT_TRUE(browser->GetBooleanPreference(prefs::kHomePageIsNewTabPage, |
| 158 &is_home_page)); | 158 &is_home_page)); |
| 159 ASSERT_TRUE(is_home_page); | 159 ASSERT_TRUE(is_home_page); |
| 160 } | 160 } |
| OLD | NEW |