| 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/logging.h" | 6 #include "base/logging.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "content/browser/frame_host/cross_site_transferring_request.h" | 8 #include "content/browser/frame_host/cross_site_transferring_request.h" |
| 9 #include "content/browser/frame_host/interstitial_page_impl.h" | 9 #include "content/browser/frame_host/interstitial_page_impl.h" |
| 10 #include "content/browser/frame_host/navigation_entry_impl.h" | 10 #include "content/browser/frame_host/navigation_entry_impl.h" |
| (...skipping 3291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3302 contents()->GetMainFrame()->GetProcess()->SimulateCrash(); | 3302 contents()->GetMainFrame()->GetProcess()->SimulateCrash(); |
| 3303 | 3303 |
| 3304 // Verify that all the power save blockers have been released. | 3304 // Verify that all the power save blockers have been released. |
| 3305 EXPECT_FALSE(has_video_power_save_blocker()); | 3305 EXPECT_FALSE(has_video_power_save_blocker()); |
| 3306 EXPECT_FALSE(has_audio_power_save_blocker()); | 3306 EXPECT_FALSE(has_audio_power_save_blocker()); |
| 3307 } | 3307 } |
| 3308 | 3308 |
| 3309 TEST_F(WebContentsImplTest, ThemeColorChangeDependingOnFirstVisiblePaint) { | 3309 TEST_F(WebContentsImplTest, ThemeColorChangeDependingOnFirstVisiblePaint) { |
| 3310 TestWebContentsObserver observer(contents()); | 3310 TestWebContentsObserver observer(contents()); |
| 3311 TestRenderFrameHost* rfh = contents()->GetMainFrame(); | 3311 TestRenderFrameHost* rfh = contents()->GetMainFrame(); |
| 3312 rfh->InitializeRenderFrameIfNeeded(); |
| 3312 | 3313 |
| 3313 SkColor transparent = SK_ColorTRANSPARENT; | 3314 SkColor transparent = SK_ColorTRANSPARENT; |
| 3314 | 3315 |
| 3315 EXPECT_EQ(transparent, contents()->GetThemeColor()); | 3316 EXPECT_EQ(transparent, contents()->GetThemeColor()); |
| 3316 EXPECT_EQ(transparent, observer.last_theme_color()); | 3317 EXPECT_EQ(transparent, observer.last_theme_color()); |
| 3317 | 3318 |
| 3318 // Theme color changes should not propagate past the WebContentsImpl before | 3319 // Theme color changes should not propagate past the WebContentsImpl before |
| 3319 // the first visually non-empty paint has occurred. | 3320 // the first visually non-empty paint has occurred. |
| 3320 RenderViewHostTester::TestOnMessageReceived( | 3321 RenderViewHostTester::TestOnMessageReceived( |
| 3321 test_rvh(), | 3322 test_rvh(), |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3367 backend->AllowCertForHost(*cert, test_url.host(), 1); | 3368 backend->AllowCertForHost(*cert, test_url.host(), 1); |
| 3368 EXPECT_TRUE(backend->HasAllowException(test_url.host())); | 3369 EXPECT_TRUE(backend->HasAllowException(test_url.host())); |
| 3369 | 3370 |
| 3370 contents()->OnDidLoadResourceFromMemoryCache(test_url, "", "GET", "mime type", | 3371 contents()->OnDidLoadResourceFromMemoryCache(test_url, "", "GET", "mime type", |
| 3371 RESOURCE_TYPE_MAIN_FRAME); | 3372 RESOURCE_TYPE_MAIN_FRAME); |
| 3372 | 3373 |
| 3373 EXPECT_TRUE(backend->HasAllowException(test_url.host())); | 3374 EXPECT_TRUE(backend->HasAllowException(test_url.host())); |
| 3374 } | 3375 } |
| 3375 | 3376 |
| 3376 } // namespace content | 3377 } // namespace content |
| OLD | NEW |