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

Unified Diff: third_party/WebKit/Source/web/tests/WebURLResponseTest.cpp

Issue 2117313002: Remove WebURLResponse::initialize() [revised] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanups Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/tests/WebURLResponseTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebURLResponseTest.cpp b/third_party/WebKit/Source/web/tests/WebURLResponseTest.cpp
index 4ffd6a8692802cd0b1610ee4a9733db718aaf3a5..8f1d8e491dc70105cb991ef272f5ae27f50430db 100644
--- a/third_party/WebKit/Source/web/tests/WebURLResponseTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebURLResponseTest.cpp
@@ -30,6 +30,8 @@
#include "public/platform/WebURLResponse.h"
+#include "platform/weborigin/KURL.h"
+#include "public/platform/WebURL.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace blink {
@@ -60,7 +62,6 @@ TEST(WebURLResponseTest, ExtraData)
TestExtraData* extraData = new TestExtraData(&alive);
EXPECT_TRUE(alive);
- urlResponse.initialize();
urlResponse.setExtraData(extraData);
EXPECT_EQ(extraData, urlResponse.getExtraData());
{
@@ -75,4 +76,17 @@ TEST(WebURLResponseTest, ExtraData)
EXPECT_FALSE(alive);
}
+TEST(WebURLResponseTest, NewInstanceIsNull)
+{
+ WebURLResponse instance;
+ EXPECT_TRUE(instance.isNull());
+}
+
+TEST(WebURLResponseTest, NotNullAfterSetURL)
+{
+ WebURLResponse instance;
+ instance.setURL(KURL(ParsedURLString, "http://localhost/"));
+ EXPECT_FALSE(instance.isNull());
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebFrameTest.cpp ('k') | third_party/WebKit/public/platform/WebURLResponse.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698