OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/files/file_path.h" | 5 #include "base/files/file_path.h" |
6 #include "base/scoped_observer.h" | 6 #include "base/scoped_observer.h" |
7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "chrome/browser/extensions/activity_log/activity_actions.h" | 10 #include "chrome/browser/extensions/activity_log/activity_actions.h" |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 << test_name << "': " << test_err; | 345 << test_name << "': " << test_err; |
346 } | 346 } |
347 | 347 |
348 // This is the primary Ad-Injection browser test. It loads an extension that | 348 // This is the primary Ad-Injection browser test. It loads an extension that |
349 // has a content script that, in turn, injects ads left, right, and center. | 349 // has a content script that, in turn, injects ads left, right, and center. |
350 // The content script waits after each injection for a response from this | 350 // The content script waits after each injection for a response from this |
351 // browsertest, in order to ensure synchronicity. After each injection, the | 351 // browsertest, in order to ensure synchronicity. After each injection, the |
352 // content script cleans up after itself. For significantly more detailed | 352 // content script cleans up after itself. For significantly more detailed |
353 // comments, see | 353 // comments, see |
354 // chrome/test/data/extensions/activity_log/ad_injection/content_script.js. | 354 // chrome/test/data/extensions/activity_log/ad_injection/content_script.js. |
355 IN_PROC_BROWSER_TEST_F(AdInjectionBrowserTest, DetectAdInjections) { | 355 // TODO(pmarch): Enable this test once modifications to Blink are done, |
| 356 // crbug.com/388287. |
| 357 IN_PROC_BROWSER_TEST_F(AdInjectionBrowserTest, DISABLED_DetectAdInjections) { |
356 const Extension* extension = LoadExtension(test_data_dir_); | 358 const Extension* extension = LoadExtension(test_data_dir_); |
357 ASSERT_TRUE(extension); | 359 ASSERT_TRUE(extension); |
358 | 360 |
359 ui_test_utils::NavigateToURL(browser(), embedded_test_server()->GetURL("/")); | 361 ui_test_utils::NavigateToURL(browser(), embedded_test_server()->GetURL("/")); |
360 | 362 |
361 std::string message; | 363 std::string message; |
362 while (message != "TestComplete") { | 364 while (message != "TestComplete") { |
363 listener()->WaitUntilSatisfied(); | 365 listener()->WaitUntilSatisfied(); |
364 message = listener()->message(); | 366 message = listener()->message(); |
365 if (message == kResetBeginString) { | 367 if (message == kResetBeginString) { |
(...skipping 14 matching lines...) Expand all Loading... |
380 listener()->Reply("Continue"); | 382 listener()->Reply("Continue"); |
381 listener()->Reset(); | 383 listener()->Reset(); |
382 } | 384 } |
383 } | 385 } |
384 | 386 |
385 // TODO(rdevlin.cronin): We test a good amount of ways of injecting ads with | 387 // TODO(rdevlin.cronin): We test a good amount of ways of injecting ads with |
386 // the above test, but more is better in testing. | 388 // the above test, but more is better in testing. |
387 // See crbug.com/357204. | 389 // See crbug.com/357204. |
388 | 390 |
389 } // namespace extensions | 391 } // namespace extensions |
OLD | NEW |