Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Side by Side Diff: content/browser/web_contents/web_contents_impl_unittest.cc

Issue 1534933002: Don't process messages sent to dead routing ids. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More unittest fixes. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 3301 matching lines...) Expand 10 before | Expand all | Expand 10 after
3312 contents()->GetMainFrame()->GetProcess()->SimulateCrash(); 3312 contents()->GetMainFrame()->GetProcess()->SimulateCrash();
3313 3313
3314 // Verify that all the power save blockers have been released. 3314 // Verify that all the power save blockers have been released.
3315 EXPECT_FALSE(has_video_power_save_blocker()); 3315 EXPECT_FALSE(has_video_power_save_blocker());
3316 EXPECT_FALSE(has_audio_power_save_blocker()); 3316 EXPECT_FALSE(has_audio_power_save_blocker());
3317 } 3317 }
3318 3318
3319 TEST_F(WebContentsImplTest, ThemeColorChangeDependingOnFirstVisiblePaint) { 3319 TEST_F(WebContentsImplTest, ThemeColorChangeDependingOnFirstVisiblePaint) {
3320 TestWebContentsObserver observer(contents()); 3320 TestWebContentsObserver observer(contents());
3321 TestRenderFrameHost* rfh = contents()->GetMainFrame(); 3321 TestRenderFrameHost* rfh = contents()->GetMainFrame();
3322 rfh->InitializeRenderFrameIfNeeded();
3322 3323
3323 SkColor transparent = SK_ColorTRANSPARENT; 3324 SkColor transparent = SK_ColorTRANSPARENT;
3324 3325
3325 EXPECT_EQ(transparent, contents()->GetThemeColor()); 3326 EXPECT_EQ(transparent, contents()->GetThemeColor());
3326 EXPECT_EQ(transparent, observer.last_theme_color()); 3327 EXPECT_EQ(transparent, observer.last_theme_color());
3327 3328
3328 // Theme color changes should not propagate past the WebContentsImpl before 3329 // Theme color changes should not propagate past the WebContentsImpl before
3329 // the first visually non-empty paint has occurred. 3330 // the first visually non-empty paint has occurred.
3330 RenderViewHostTester::TestOnMessageReceived( 3331 RenderViewHostTester::TestOnMessageReceived(
3331 test_rvh(), 3332 test_rvh(),
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
3377 backend->AllowCertForHost(*cert, test_url.host(), 1); 3378 backend->AllowCertForHost(*cert, test_url.host(), 1);
3378 EXPECT_TRUE(backend->HasAllowException(test_url.host())); 3379 EXPECT_TRUE(backend->HasAllowException(test_url.host()));
3379 3380
3380 contents()->OnDidLoadResourceFromMemoryCache(test_url, "", "GET", "mime type", 3381 contents()->OnDidLoadResourceFromMemoryCache(test_url, "", "GET", "mime type",
3381 RESOURCE_TYPE_MAIN_FRAME); 3382 RESOURCE_TYPE_MAIN_FRAME);
3382 3383
3383 EXPECT_TRUE(backend->HasAllowException(test_url.host())); 3384 EXPECT_TRUE(backend->HasAllowException(test_url.host()));
3384 } 3385 }
3385 3386
3386 } // namespace content 3387 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac_unittest.mm ('k') | content/test/test_render_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698