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

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

Issue 2140523002: Remove WebURLRequest::initialize() and simplify WebURLRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mutable ref 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } // anonymous namespace 53 } // anonymous namespace
54 54
55 TEST(WebURLRequestTest, ExtraData) 55 TEST(WebURLRequestTest, ExtraData)
56 { 56 {
57 bool alive = false; 57 bool alive = false;
58 { 58 {
59 WebURLRequest urlRequest; 59 WebURLRequest urlRequest;
60 TestExtraData* extraData = new TestExtraData(&alive); 60 TestExtraData* extraData = new TestExtraData(&alive);
61 EXPECT_TRUE(alive); 61 EXPECT_TRUE(alive);
62 62
63 urlRequest.initialize();
64 urlRequest.setExtraData(extraData); 63 urlRequest.setExtraData(extraData);
65 EXPECT_EQ(extraData, urlRequest.getExtraData()); 64 EXPECT_EQ(extraData, urlRequest.getExtraData());
66 { 65 {
67 WebURLRequest otherUrlRequest = urlRequest; 66 WebURLRequest otherUrlRequest = urlRequest;
68 EXPECT_TRUE(alive); 67 EXPECT_TRUE(alive);
69 EXPECT_EQ(extraData, otherUrlRequest.getExtraData()); 68 EXPECT_EQ(extraData, otherUrlRequest.getExtraData());
70 EXPECT_EQ(extraData, urlRequest.getExtraData()); 69 EXPECT_EQ(extraData, urlRequest.getExtraData());
71 } 70 }
72 EXPECT_TRUE(alive); 71 EXPECT_TRUE(alive);
73 EXPECT_EQ(extraData, urlRequest.getExtraData()); 72 EXPECT_EQ(extraData, urlRequest.getExtraData());
74 } 73 }
75 EXPECT_FALSE(alive); 74 EXPECT_FALSE(alive);
76 } 75 }
77 76
78 } // namespace blink 77 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebFrameTest.cpp ('k') | third_party/WebKit/Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698