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 <stdint.h> | 5 #include <stdint.h> |
6 #include <utility> | 6 #include <utility> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 3297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3308 contents()->GetMainFrame()->GetProcess()->SimulateCrash(); | 3308 contents()->GetMainFrame()->GetProcess()->SimulateCrash(); |
3309 | 3309 |
3310 // Verify that all the power save blockers have been released. | 3310 // Verify that all the power save blockers have been released. |
3311 EXPECT_FALSE(has_video_power_save_blocker()); | 3311 EXPECT_FALSE(has_video_power_save_blocker()); |
3312 EXPECT_FALSE(has_audio_power_save_blocker()); | 3312 EXPECT_FALSE(has_audio_power_save_blocker()); |
3313 } | 3313 } |
3314 | 3314 |
3315 TEST_F(WebContentsImplTest, ThemeColorChangeDependingOnFirstVisiblePaint) { | 3315 TEST_F(WebContentsImplTest, ThemeColorChangeDependingOnFirstVisiblePaint) { |
3316 TestWebContentsObserver observer(contents()); | 3316 TestWebContentsObserver observer(contents()); |
3317 TestRenderFrameHost* rfh = contents()->GetMainFrame(); | 3317 TestRenderFrameHost* rfh = contents()->GetMainFrame(); |
| 3318 rfh->InitializeRenderFrameIfNeeded(); |
3318 | 3319 |
3319 SkColor transparent = SK_ColorTRANSPARENT; | 3320 SkColor transparent = SK_ColorTRANSPARENT; |
3320 | 3321 |
3321 EXPECT_EQ(transparent, contents()->GetThemeColor()); | 3322 EXPECT_EQ(transparent, contents()->GetThemeColor()); |
3322 EXPECT_EQ(transparent, observer.last_theme_color()); | 3323 EXPECT_EQ(transparent, observer.last_theme_color()); |
3323 | 3324 |
3324 // Theme color changes should not propagate past the WebContentsImpl before | 3325 // Theme color changes should not propagate past the WebContentsImpl before |
3325 // the first visually non-empty paint has occurred. | 3326 // the first visually non-empty paint has occurred. |
3326 RenderViewHostTester::TestOnMessageReceived( | 3327 RenderViewHostTester::TestOnMessageReceived( |
3327 test_rvh(), | 3328 test_rvh(), |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3373 backend->AllowCertForHost(*cert, test_url.host(), 1); | 3374 backend->AllowCertForHost(*cert, test_url.host(), 1); |
3374 EXPECT_TRUE(backend->HasAllowException(test_url.host())); | 3375 EXPECT_TRUE(backend->HasAllowException(test_url.host())); |
3375 | 3376 |
3376 contents()->OnDidLoadResourceFromMemoryCache(test_url, "", "GET", "mime type", | 3377 contents()->OnDidLoadResourceFromMemoryCache(test_url, "", "GET", "mime type", |
3377 RESOURCE_TYPE_MAIN_FRAME); | 3378 RESOURCE_TYPE_MAIN_FRAME); |
3378 | 3379 |
3379 EXPECT_TRUE(backend->HasAllowException(test_url.host())); | 3380 EXPECT_TRUE(backend->HasAllowException(test_url.host())); |
3380 } | 3381 } |
3381 | 3382 |
3382 } // namespace content | 3383 } // namespace content |
OLD | NEW |