Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 499 EXPECT_NE(kBlue, webView->backgroundColor()); | 499 EXPECT_NE(kBlue, webView->backgroundColor()); |
| 500 // webView does not have a frame yet, but we should still be able to set the background color. | 500 // webView does not have a frame yet, but we should still be able to set the background color. |
| 501 webView->setBaseBackgroundColor(kBlue); | 501 webView->setBaseBackgroundColor(kBlue); |
| 502 EXPECT_EQ(kBlue, webView->backgroundColor()); | 502 EXPECT_EQ(kBlue, webView->backgroundColor()); |
| 503 WebLocalFrameImpl* frame = WebLocalFrameImpl::create(WebTreeScopeType::Docum ent, nullptr); | 503 WebLocalFrameImpl* frame = WebLocalFrameImpl::create(WebTreeScopeType::Docum ent, nullptr); |
| 504 webView->setMainFrame(frame); | 504 webView->setMainFrame(frame); |
| 505 webView->close(); | 505 webView->close(); |
| 506 frame->close(); | 506 frame->close(); |
| 507 } | 507 } |
| 508 | 508 |
| 509 TEST_F(WebViewTest, SetBaseBackgroundColorAndBlendWithExistingContent) | 509 TEST_F(WebViewTest, DISABLED_SetBaseBackgroundColorAndBlendWithExistingContent) |
|
wkorman
2015/06/09 23:31:06
Do you remember what prompted need to disable this
Xianzhu
2015/06/09 23:52:19
Perhaps because of incompatible painting method at
| |
| 510 { | 510 { |
| 511 const WebColor kAlphaRed = 0x80FF0000; | 511 const WebColor kAlphaRed = 0x80FF0000; |
| 512 const WebColor kAlphaGreen = 0x8000FF00; | 512 const WebColor kAlphaGreen = 0x8000FF00; |
| 513 const int kWidth = 100; | 513 const int kWidth = 100; |
| 514 const int kHeight = 100; | 514 const int kHeight = 100; |
| 515 | 515 |
| 516 WebView* webView = m_webViewHelper.initialize(); | 516 WebView* webView = m_webViewHelper.initialize(); |
| 517 | 517 |
| 518 // Set WebView background to green with alpha. | 518 // Set WebView background to green with alpha. |
| 519 webView->setBaseBackgroundColor(kAlphaGreen); | 519 webView->setBaseBackgroundColor(kAlphaGreen); |
| (...skipping 2524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3044 for (size_t i = 0; i < renders.size(); ++i) { | 3044 for (size_t i = 0; i < renders.size(); ++i) { |
| 3045 double docStartTime = frame->domWindow()->document()->loader()->timing() .monotonicTimeToZeroBasedDocumentTime(renderPairs[i].startTime) * 1000.0; | 3045 double docStartTime = frame->domWindow()->document()->loader()->timing() .monotonicTimeToZeroBasedDocumentTime(renderPairs[i].startTime) * 1000.0; |
| 3046 ASSERT_DOUBLE_EQ(docStartTime, renders[i]->startTime()); | 3046 ASSERT_DOUBLE_EQ(docStartTime, renders[i]->startTime()); |
| 3047 double docFinishTime = frame->domWindow()->document()->loader()->timing( ).monotonicTimeToZeroBasedDocumentTime(renderPairs[i].finishTime) * 1000.0; | 3047 double docFinishTime = frame->domWindow()->document()->loader()->timing( ).monotonicTimeToZeroBasedDocumentTime(renderPairs[i].finishTime) * 1000.0; |
| 3048 double docDuration = docFinishTime - docStartTime; | 3048 double docDuration = docFinishTime - docStartTime; |
| 3049 ASSERT_DOUBLE_EQ(docDuration, renders[i]->duration()); | 3049 ASSERT_DOUBLE_EQ(docDuration, renders[i]->duration()); |
| 3050 } | 3050 } |
| 3051 } | 3051 } |
| 3052 | 3052 |
| 3053 } // namespace | 3053 } // namespace |
| OLD | NEW |