| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 base::ASCIIToUTF16("title"), | 245 base::ASCIIToUTF16("title"), |
| 246 GURL("http://test2/")); | 246 GURL("http://test2/")); |
| 247 | 247 |
| 248 NavigateInRenderer(tab, GURL("http://test2/")); | 248 NavigateInRenderer(tab, GURL("http://test2/")); |
| 249 EXPECT_EQ(match_is_bookmarked, page_action->GetIsVisible(tab_id)); | 249 EXPECT_EQ(match_is_bookmarked, page_action->GetIsVisible(tab_id)); |
| 250 | 250 |
| 251 NavigateInRenderer(tab, GURL("http://test3/")); | 251 NavigateInRenderer(tab, GURL("http://test3/")); |
| 252 EXPECT_EQ(!match_is_bookmarked, page_action->GetIsVisible(tab_id)); | 252 EXPECT_EQ(!match_is_bookmarked, page_action->GetIsVisible(tab_id)); |
| 253 } | 253 } |
| 254 | 254 |
| 255 IN_PROC_BROWSER_TEST_F(DeclarativeContentApiTest, Overview) { | 255 // Disabled due to flake. https://crbug.com/606574. |
| 256 IN_PROC_BROWSER_TEST_F(DeclarativeContentApiTest, DISABLED_Overview) { |
| 256 ext_dir_.WriteManifest(kDeclarativeContentManifest); | 257 ext_dir_.WriteManifest(kDeclarativeContentManifest); |
| 257 ext_dir_.WriteFile( | 258 ext_dir_.WriteFile( |
| 258 FILE_PATH_LITERAL("background.js"), | 259 FILE_PATH_LITERAL("background.js"), |
| 259 "var declarative = chrome.declarative;\n" | 260 "var declarative = chrome.declarative;\n" |
| 260 "\n" | 261 "\n" |
| 261 "var PageStateMatcher = chrome.declarativeContent.PageStateMatcher;\n" | 262 "var PageStateMatcher = chrome.declarativeContent.PageStateMatcher;\n" |
| 262 "var ShowPageAction = chrome.declarativeContent.ShowPageAction;\n" | 263 "var ShowPageAction = chrome.declarativeContent.ShowPageAction;\n" |
| 263 "\n" | 264 "\n" |
| 264 "var rule = {\n" | 265 "var rule = {\n" |
| 265 " conditions: [new PageStateMatcher({\n" | 266 " conditions: [new PageStateMatcher({\n" |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 // action interfaces, add a test that checks that a navigation always evaluates | 926 // action interfaces, add a test that checks that a navigation always evaluates |
| 926 // consistent URL state for all conditions. i.e.: if condition1 evaluates to | 927 // consistent URL state for all conditions. i.e.: if condition1 evaluates to |
| 927 // false on url0 and true on url1, and condition2 evaluates to true on url0 and | 928 // false on url0 and true on url1, and condition2 evaluates to true on url0 and |
| 928 // false on url1, navigate from url0 to url1 and validate that no action is | 929 // false on url1, navigate from url0 to url1 and validate that no action is |
| 929 // triggered. Do the same when navigating back to url0. This kind of test is | 930 // triggered. Do the same when navigating back to url0. This kind of test is |
| 930 // unfortunately not feasible with the current implementation and the existing | 931 // unfortunately not feasible with the current implementation and the existing |
| 931 // supported conditions and actions. | 932 // supported conditions and actions. |
| 932 | 933 |
| 933 } // namespace | 934 } // namespace |
| 934 } // namespace extensions | 935 } // namespace extensions |
| OLD | NEW |