OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014, Google Inc. All rights reserved. | 2 * Copyright (c) 2014, 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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 EXPECT_EQ(observer.updatedCharacterDataRecords()[2]->m_newLength, 3u); | 583 EXPECT_EQ(observer.updatedCharacterDataRecords()[2]->m_newLength, 3u); |
584 | 584 |
585 replaceSample->replaceData(6, 4, "ghi", ASSERT_NO_EXCEPTION); | 585 replaceSample->replaceData(6, 4, "ghi", ASSERT_NO_EXCEPTION); |
586 ASSERT_EQ(observer.updatedCharacterDataRecords().size(), 4u); | 586 ASSERT_EQ(observer.updatedCharacterDataRecords().size(), 4u); |
587 EXPECT_EQ(observer.updatedCharacterDataRecords()[3]->m_node, replaceSample); | 587 EXPECT_EQ(observer.updatedCharacterDataRecords()[3]->m_node, replaceSample); |
588 EXPECT_EQ(observer.updatedCharacterDataRecords()[3]->m_offset, 6u); | 588 EXPECT_EQ(observer.updatedCharacterDataRecords()[3]->m_offset, 6u); |
589 EXPECT_EQ(observer.updatedCharacterDataRecords()[3]->m_oldLength, 4u); | 589 EXPECT_EQ(observer.updatedCharacterDataRecords()[3]->m_oldLength, 4u); |
590 EXPECT_EQ(observer.updatedCharacterDataRecords()[3]->m_newLength, 3u); | 590 EXPECT_EQ(observer.updatedCharacterDataRecords()[3]->m_newLength, 3u); |
591 } | 591 } |
592 | 592 |
| 593 // This tests that meta-theme-color can be found correctly |
| 594 TEST_F(DocumentTest, ThemeColor) { |
| 595 { |
| 596 setHtmlInnerHTML( |
| 597 "<meta name=\"theme-color\" content=\"#00ff00\">" |
| 598 "<body>"); |
| 599 EXPECT_EQ(Color(0, 255, 0), document().themeColor()) |
| 600 << "Theme color should be bright green."; |
| 601 } |
| 602 |
| 603 { |
| 604 setHtmlInnerHTML( |
| 605 "<body>" |
| 606 "<meta name=\"theme-color\" content=\"#00ff00\">"); |
| 607 EXPECT_EQ(Color(0, 255, 0), document().themeColor()) |
| 608 << "Theme color should be bright green."; |
| 609 } |
| 610 } |
| 611 |
593 } // namespace blink | 612 } // namespace blink |
OLD | NEW |