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

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

Issue 2831583004: Remove redundant WebLocalFrame* parameter from DidClearWindowObject (Closed)
Patch Set: Rebase Created 3 years, 8 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 /* 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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 WebFrameContentDumper::DumpWebViewAsText(web_view_helper.WebView(), 1024) 683 WebFrameContentDumper::DumpWebViewAsText(web_view_helper.WebView(), 1024)
684 .Utf8(); 684 .Utf8();
685 EXPECT_EQ("http://internal.test:0/" + file_name, content); 685 EXPECT_EQ("http://internal.test:0/" + file_name, content);
686 } 686 }
687 687
688 class EvaluateOnLoadWebFrameClient 688 class EvaluateOnLoadWebFrameClient
689 : public FrameTestHelpers::TestWebFrameClient { 689 : public FrameTestHelpers::TestWebFrameClient {
690 public: 690 public:
691 EvaluateOnLoadWebFrameClient() : executing_(false), was_executed_(false) {} 691 EvaluateOnLoadWebFrameClient() : executing_(false), was_executed_(false) {}
692 692
693 void DidClearWindowObject(WebLocalFrame* frame) override { 693 void DidClearWindowObject() override {
694 EXPECT_FALSE(executing_); 694 EXPECT_FALSE(executing_);
695 was_executed_ = true; 695 was_executed_ = true;
696 executing_ = true; 696 executing_ = true;
697 v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); 697 v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
698 frame->ExecuteScriptAndReturnValue( 698 Frame()->ExecuteScriptAndReturnValue(
699 WebScriptSource(WebString("window.someProperty = 42;"))); 699 WebScriptSource(WebString("window.someProperty = 42;")));
700 executing_ = false; 700 executing_ = false;
701 } 701 }
702 702
703 bool executing_; 703 bool executing_;
704 bool was_executed_; 704 bool was_executed_;
705 }; 705 };
706 706
707 TEST_P(ParameterizedWebFrameTest, DidClearWindowObjectIsNotRecursive) { 707 TEST_P(ParameterizedWebFrameTest, DidClearWindowObjectIsNotRecursive) {
708 EvaluateOnLoadWebFrameClient web_frame_client; 708 EvaluateOnLoadWebFrameClient web_frame_client;
(...skipping 11290 matching lines...) Expand 10 before | Expand all | Expand 10 after
11999 11999
12000 // Failing the original child frame navigation and trying to render fallback 12000 // Failing the original child frame navigation and trying to render fallback
12001 // content shouldn't crash. It should return NoLoadInProgress. This is so the 12001 // content shouldn't crash. It should return NoLoadInProgress. This is so the
12002 // caller won't attempt to replace the correctly empty frame with an error 12002 // caller won't attempt to replace the correctly empty frame with an error
12003 // page. 12003 // page.
12004 EXPECT_EQ(WebLocalFrame::NoLoadInProgress, 12004 EXPECT_EQ(WebLocalFrame::NoLoadInProgress,
12005 child->MaybeRenderFallbackContent(WebURLError())); 12005 child->MaybeRenderFallbackContent(WebURLError()));
12006 } 12006 }
12007 12007
12008 } // namespace blink 12008 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/LocalFrameClientImpl.cpp ('k') | third_party/WebKit/public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698