| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 #include "platform/text/BidiTestHarness.h" | 34 #include "platform/text/BidiTestHarness.h" |
| 35 #include "platform/text/TextRunIterator.h" | 35 #include "platform/text/TextRunIterator.h" |
| 36 #include "wtf/OwnPtr.h" | 36 #include "wtf/OwnPtr.h" |
| 37 #include <fstream> | 37 #include <fstream> |
| 38 #include <gtest/gtest.h> | 38 #include <gtest/gtest.h> |
| 39 | 39 |
| 40 namespace { | 40 namespace { |
| 41 | 41 |
| 42 using namespace WTF; | 42 using namespace WTF; |
| 43 using namespace WebCore; | 43 using namespace blink; |
| 44 | 44 |
| 45 TEST(BidiResolver, Basic) | 45 TEST(BidiResolver, Basic) |
| 46 { | 46 { |
| 47 bool hasStrongDirectionality; | 47 bool hasStrongDirectionality; |
| 48 String value("foo"); | 48 String value("foo"); |
| 49 TextRun run(value); | 49 TextRun run(value); |
| 50 BidiResolver<TextRunIterator, BidiCharacterRun> bidiResolver; | 50 BidiResolver<TextRunIterator, BidiCharacterRun> bidiResolver; |
| 51 bidiResolver.setStatus(BidiStatus(run.direction(), run.directionalOverride()
)); | 51 bidiResolver.setStatus(BidiStatus(run.direction(), run.directionalOverride()
)); |
| 52 bidiResolver.setPositionIgnoringNestedIsolates(TextRunIterator(&run, 0)); | 52 bidiResolver.setPositionIgnoringNestedIsolates(TextRunIterator(&run, 0)); |
| 53 TextDirection direction = bidiResolver.determineParagraphDirectionality(&has
StrongDirectionality); | 53 TextDirection direction = bidiResolver.determineParagraphDirectionality(&has
StrongDirectionality); |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 // The unittest harness only pays attention to GTest output, so we verify | 285 // The unittest harness only pays attention to GTest output, so we verify |
| 286 // that the tests behaved as expected: | 286 // that the tests behaved as expected: |
| 287 EXPECT_EQ(352098u, runner.m_testsRun); | 287 EXPECT_EQ(352098u, runner.m_testsRun); |
| 288 EXPECT_EQ(418143u, runner.m_testsSkipped); | 288 EXPECT_EQ(418143u, runner.m_testsSkipped); |
| 289 EXPECT_EQ(0u, runner.m_ignoredCharFailures); | 289 EXPECT_EQ(0u, runner.m_ignoredCharFailures); |
| 290 EXPECT_EQ(44882u, runner.m_levelFailures); | 290 EXPECT_EQ(44882u, runner.m_levelFailures); |
| 291 EXPECT_EQ(19151u, runner.m_orderFailures); | 291 EXPECT_EQ(19151u, runner.m_orderFailures); |
| 292 } | 292 } |
| 293 | 293 |
| 294 } | 294 } |
| OLD | NEW |