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

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

Issue 2120233003: [OBSOLETE] Remove WebURLResponse::initialize() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove non-const WrappedResourceResponse::bind() 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 81dcff686c5c185ac24b945c779277fd436a3f7e..f70e90b2c61c14c0ea439494ee0a96a4620e88ef 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 {
@@ -56,7 +58,6 @@ TEST(WebURLResponseTest, ExtraData)
TestExtraData* extraData = new TestExtraData(&alive);
EXPECT_TRUE(alive);
- urlResponse.initialize();
urlResponse.setExtraData(extraData);
EXPECT_EQ(extraData, urlResponse.getExtraData());
{
@@ -71,4 +72,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

Powered by Google App Engine
This is Rietveld 408576698