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

Side by Side Diff: Source/web/tests/WebFrameTest.cpp

Issue 683013002: Extract a DOMWindow interface from LocalDOMWindow and use it in the idl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on top of DOMWindow moves and UseCounter overload for Frame Created 6 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 EXPECT_EQ(std::string::npos, content.find("Message 2.")); 665 EXPECT_EQ(std::string::npos, content.find("Message 2."));
666 } 666 }
667 667
668 TEST_F(WebFrameTest, PostMessageThenDetach) 668 TEST_F(WebFrameTest, PostMessageThenDetach)
669 { 669 {
670 FrameTestHelpers::WebViewHelper webViewHelper; 670 FrameTestHelpers::WebViewHelper webViewHelper;
671 webViewHelper.initializeAndLoad("about:blank"); 671 webViewHelper.initializeAndLoad("about:blank");
672 672
673 RefPtrWillBeRawPtr<LocalFrame> frame = toLocalFrame(webViewHelper.webViewImp l()->page()->mainFrame()); 673 RefPtrWillBeRawPtr<LocalFrame> frame = toLocalFrame(webViewHelper.webViewImp l()->page()->mainFrame());
674 NonThrowableExceptionState exceptionState; 674 NonThrowableExceptionState exceptionState;
675 frame->domWindow()->postMessage(SerializedScriptValue::create("message"), 0, "*", frame->domWindow(), exceptionState); 675 frame->domWindow()->postMessage(SerializedScriptValue::create("message"), 0, "*", frame->localDOMWindow(), exceptionState);
676 webViewHelper.reset(); 676 webViewHelper.reset();
677 EXPECT_FALSE(exceptionState.hadException()); 677 EXPECT_FALSE(exceptionState.hadException());
678 678
679 // Success is not crashing. 679 // Success is not crashing.
680 runPendingTasks(); 680 runPendingTasks();
681 } 681 }
682 682
683 class FixedLayoutTestWebViewClient : public FrameTestHelpers::TestWebViewClient { 683 class FixedLayoutTestWebViewClient : public FrameTestHelpers::TestWebViewClient {
684 public: 684 public:
685 virtual WebScreenInfo screenInfo() override { return m_screenInfo; } 685 virtual WebScreenInfo screenInfo() override { return m_screenInfo; }
(...skipping 6230 matching lines...) Expand 10 before | Expand all | Expand 10 after
6916 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6916 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6917 6917
6918 // Neither should a page reload. 6918 // Neither should a page reload.
6919 localFrame->reload(); 6919 localFrame->reload();
6920 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); 6920 EXPECT_EQ(4u, frameClient.provisionalLoadCount());
6921 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); 6921 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition());
6922 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6922 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6923 } 6923 }
6924 6924
6925 } // namespace 6925 } // namespace
OLDNEW
« Source/core/events/TouchEvent.cpp ('K') | « Source/web/WebPagePopupImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698