| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |