<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[153344] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/153344">153344</a></dd>
<dt>Author</dt> <dd>weinig@apple.com</dd>
<dt>Date</dt> <dd>2013-07-25 13:52:59 -0700 (Thu, 25 Jul 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>-[WebHTMLView attributedSubstringForProposedRange:actualRange:] does not include strikethrough attribute in the returned attributed string
https://bugs.webkit.org/show_bug.cgi?id=119099
&lt;rdar://problem/13439291&gt;

Reviewed by Enrica Casucci.

Source/WebCore: 

Tests:
    API Test: AttributedStringTest_Strikethrough

* platform/mac/HTMLConverter.mm:
(+[WebHTMLConverter editingAttributedStringFromRange:]):
Set the NSStrikethroughStyleAttributeName attribute when text-decoration: line-through is seen.

Tools: 

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/AttributedString.mm:
(TestWebKitAPI::attributedString):
(TestWebKitAPI::AttributedStringTest_CustomFont::didLoadURL):
(TestWebKitAPI::AttributedStringTest_CustomFont::url):
(TestWebKitAPI::AttributedStringTest_CustomFont::runTest):
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::AttributedStringTest_Strikethrough::didLoadURL):
(TestWebKitAPI::AttributedStringTest_Strikethrough::url):
(TestWebKitAPI::AttributedStringTest_Strikethrough::runTest):
* TestWebKitAPI/Tests/mac/attributedStringStrikethrough.html: Added.
Add tests for attributed strings with strikethrough.  Refactor the attributed string tests
to make adding more easier in the future.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformmacHTMLConvertermm">trunk/Source/WebCore/platform/mac/HTMLConverter.mm</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj">trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsmacAttributedStringmm">trunk/Tools/TestWebKitAPI/Tests/mac/AttributedString.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkToolsTestWebKitAPITestsmacattributedStringStrikethroughhtml">trunk/Tools/TestWebKitAPI/Tests/mac/attributedStringStrikethrough.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (153343 => 153344)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-07-25 20:40:24 UTC (rev 153343)
+++ trunk/Source/WebCore/ChangeLog        2013-07-25 20:52:59 UTC (rev 153344)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2013-07-25  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        -[WebHTMLView attributedSubstringForProposedRange:actualRange:] does not include strikethrough attribute in the returned attributed string
+        https://bugs.webkit.org/show_bug.cgi?id=119099
+        &lt;rdar://problem/13439291&gt;
+
+        Reviewed by Enrica Casucci.
+
+        Tests:
+            API Test: AttributedStringTest_Strikethrough
+
+        * platform/mac/HTMLConverter.mm:
+        (+[WebHTMLConverter editingAttributedStringFromRange:]):
+        Set the NSStrikethroughStyleAttributeName attribute when text-decoration: line-through is seen.
+
</ins><span class="cx"> 2013-07-25  Pratik Solanki  &lt;psolanki@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed build fix after r153333.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacHTMLConvertermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/HTMLConverter.mm (153343 => 153344)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/HTMLConverter.mm        2013-07-25 20:40:24 UTC (rev 153343)
+++ trunk/Source/WebCore/platform/mac/HTMLConverter.mm        2013-07-25 20:52:59 UTC (rev 153344)
</span><span class="lines">@@ -1696,6 +1696,8 @@
</span><span class="cx">         RenderStyle* style = renderer-&gt;style();
</span><span class="cx">         if (style-&gt;textDecorationsInEffect() &amp; TextDecorationUnderline)
</span><span class="cx">             [attrs.get() setObject:[NSNumber numberWithInteger:NSUnderlineStyleSingle] forKey:NSUnderlineStyleAttributeName];
</span><ins>+        if (style-&gt;textDecorationsInEffect() &amp; TextDecorationLineThrough)
+            [attrs.get() setObject:[NSNumber numberWithInteger:NSUnderlineStyleSingle] forKey:NSStrikethroughStyleAttributeName];
</ins><span class="cx">         if (NSFont *font = style-&gt;font().primaryFont()-&gt;getNSFont())
</span><span class="cx">             [attrs.get() setObject:font forKey:NSFontAttributeName];
</span><span class="cx">         else
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (153343 => 153344)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2013-07-25 20:40:24 UTC (rev 153343)
+++ trunk/Tools/ChangeLog        2013-07-25 20:52:59 UTC (rev 153344)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2013-07-25  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        -[WebHTMLView attributedSubstringForProposedRange:actualRange:] does not include strikethrough attribute in the returned attributed string
+        https://bugs.webkit.org/show_bug.cgi?id=119099
+        &lt;rdar://problem/13439291&gt;
+
+        Reviewed by Enrica Casucci.
+
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/mac/AttributedString.mm:
+        (TestWebKitAPI::attributedString):
+        (TestWebKitAPI::AttributedStringTest_CustomFont::didLoadURL):
+        (TestWebKitAPI::AttributedStringTest_CustomFont::url):
+        (TestWebKitAPI::AttributedStringTest_CustomFont::runTest):
+        (TestWebKitAPI::TEST_F):
+        (TestWebKitAPI::AttributedStringTest_Strikethrough::didLoadURL):
+        (TestWebKitAPI::AttributedStringTest_Strikethrough::url):
+        (TestWebKitAPI::AttributedStringTest_Strikethrough::runTest):
+        * TestWebKitAPI/Tests/mac/attributedStringStrikethrough.html: Added.
+        Add tests for attributed strings with strikethrough.  Refactor the attributed string tests
+        to make adding more easier in the future.
+
</ins><span class="cx"> 2013-07-20  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         fourthTier: FTL should be able to generate LLVM IR that uses an intrinsic for OSR exit
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (153343 => 153344)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2013-07-25 20:40:24 UTC (rev 153343)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2013-07-25 20:52:59 UTC (rev 153344)
</span><span class="lines">@@ -101,6 +101,7 @@
</span><span class="cx">                 76E182DD1547569100F1FADD /* WillSendSubmitEvent_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76E182DC1547569100F1FADD /* WillSendSubmitEvent_Bundle.cpp */; };
</span><span class="cx">                 76E182DF154767E600F1FADD /* auto-submitting-form.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 76E182DE15475A8300F1FADD /* auto-submitting-form.html */; };
</span><span class="cx">                 7C8DDAAB1735DEEE00EA5AC0 /* CloseThenTerminate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C8DDAA91735DE1D00EA5AC0 /* CloseThenTerminate.cpp */; };
</span><ins>+                7C9ED98B17A19F4B00E4DC33 /* attributedStringStrikethrough.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 7C9ED98A17A19D0600E4DC33 /* attributedStringStrikethrough.html */; };
</ins><span class="cx">                 7CFBCADF1743234F00B2BFCF /* WillLoad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CFBCADD1743234F00B2BFCF /* WillLoad.cpp */; };
</span><span class="cx">                 7CFBCAE51743238F00B2BFCF /* WillLoad_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CFBCAE31743238E00B2BFCF /* WillLoad_Bundle.cpp */; };
</span><span class="cx">                 81B50193140F232300D9EB58 /* StringBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 81B50192140F232300D9EB58 /* StringBuilder.cpp */; };
</span><span class="lines">@@ -267,6 +268,7 @@
</span><span class="cx">                                 379028B914FAC24C007E6B43 /* acceptsFirstMouse.html in Copy Resources */,
</span><span class="cx">                                 B55F11BE15191A0600915916 /* Ahem.ttf in Copy Resources */,
</span><span class="cx">                                 B55F11B71517D03300915916 /* attributedStringCustomFont.html in Copy Resources */,
</span><ins>+                                7C9ED98B17A19F4B00E4DC33 /* attributedStringStrikethrough.html in Copy Resources */,
</ins><span class="cx">                                 76E182DF154767E600F1FADD /* auto-submitting-form.html in Copy Resources */,
</span><span class="cx">                                 26DF5A6315A2A27E003689C2 /* CancelLoadFromResourceLoadDelegate.html in Copy Resources */,
</span><span class="cx">                                 5142B2731517C8C800C32B19 /* ContextMenuCanCopyURL.html in Copy Resources */,
</span><span class="lines">@@ -403,6 +405,7 @@
</span><span class="cx">                 76E182DC1547569100F1FADD /* WillSendSubmitEvent_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WillSendSubmitEvent_Bundle.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 76E182DE15475A8300F1FADD /* auto-submitting-form.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = &quot;auto-submitting-form.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C8DDAA91735DE1D00EA5AC0 /* CloseThenTerminate.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CloseThenTerminate.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                7C9ED98A17A19D0600E4DC33 /* attributedStringStrikethrough.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = attributedStringStrikethrough.html; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 7CFBCADD1743234F00B2BFCF /* WillLoad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WillLoad.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7CFBCAE31743238E00B2BFCF /* WillLoad_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WillLoad_Bundle.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 81B50192140F232300D9EB58 /* StringBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringBuilder.cpp; path = WTF/StringBuilder.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -925,6 +928,7 @@
</span><span class="cx">                 C07E6CB013FD737C0038B22B /* Resources */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                7C9ED98A17A19D0600E4DC33 /* attributedStringStrikethrough.html */,
</ins><span class="cx">                                 C2CF975816CEC69E0054E99D /* JSContextBackForwardCache1.html */,
</span><span class="cx">                                 C2CF975916CEC69E0054E99D /* JSContextBackForwardCache2.html */,
</span><span class="cx">                                 379028B814FABE49007E6B43 /* acceptsFirstMouse.html */,
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsmacAttributedStringmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/mac/AttributedString.mm (153343 => 153344)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/mac/AttributedString.mm        2013-07-25 20:40:24 UTC (rev 153343)
+++ trunk/Tools/TestWebKitAPI/Tests/mac/AttributedString.mm        2013-07-25 20:52:59 UTC (rev 153344)
</span><span class="lines">@@ -23,71 +23,88 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#include &quot;config.h&quot;
-#include &quot;PlatformUtilities.h&quot;
-#include &quot;PlatformWebView.h&quot;
-#include &lt;wtf/RetainPtr.h&gt;
</del><ins>+#import &quot;config.h&quot;
+#import &quot;Test.h&quot;
</ins><span class="cx"> 
</span><ins>+#import &quot;PlatformUtilities.h&quot;
+#import &quot;PlatformWebView.h&quot;
+#import &quot;WebKitAgnosticTest.h&quot;
+#import &lt;wtf/RetainPtr.h&gt;
</ins><span class="cx"> 
</span><del>-@interface AttributedStringTest : NSObject {
</del><ins>+namespace TestWebKitAPI {
+
+static NSAttributedString *attributedString(WebView *webView, NSRange range)
+{
+    return [(NSView &lt;NSTextInput&gt; *)[[[webView mainFrame] frameView] documentView] attributedSubstringFromRange:range];
</ins><span class="cx"> }
</span><del>-@end
</del><span class="cx"> 
</span><del>-static bool didFinishLoad;
</del><ins>+static NSAttributedString *attributedString(WKView *wkView, NSRange range)
+{
+    NSRange actualRange;
+    return [wkView attributedSubstringForProposedRange:range actualRange:&amp;actualRange];
+}
</ins><span class="cx"> 
</span><del>-@implementation AttributedStringTest
</del><span class="cx"> 
</span><del>-- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
</del><ins>+class AttributedStringTest_CustomFont : public WebKitAgnosticTest {
+public:
+    template &lt;typename View&gt; void runTest(View);
+
+    // WebKitAgnosticTest
+    virtual void didLoadURL(WebView *webView) { runTest(webView); }
+    virtual void didLoadURL(WKView *wkView) { runTest(wkView); }
+
+    virtual NSURL *url() const { return [[NSBundle mainBundle] URLForResource:@&quot;attributedStringCustomFont&quot; withExtension:@&quot;html&quot; subdirectory:@&quot;TestWebKitAPI.resources&quot;]; }
+};
+
+template &lt;typename View&gt;
+void AttributedStringTest_CustomFont::runTest(View view)
</ins><span class="cx"> {
</span><del>-    didFinishLoad = true;
</del><ins>+    NSAttributedString *attrString = attributedString(view, NSMakeRange(0, 5));
+    EXPECT_WK_STREQ(&quot;Lorem&quot;, [attrString string]);
</ins><span class="cx"> }
</span><del>-@end
</del><span class="cx"> 
</span><del>-namespace TestWebKitAPI {
</del><ins>+TEST_F(AttributedStringTest_CustomFont, WebKit)
+{
+    runWebKit1Test();
+}
</ins><span class="cx"> 
</span><del>-static void didFinishLoadForFrame(WKPageRef, WKFrameRef, WKTypeRef, const void*)
</del><ins>+TEST_F(AttributedStringTest_CustomFont, WebKit2)
</ins><span class="cx"> {
</span><del>-    didFinishLoad = true;
</del><ins>+    runWebKit2Test();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-TEST(WebKit1, AttributedStringTest)
</del><ins>+class AttributedStringTest_Strikethrough : public WebKitAgnosticTest {
+public:
+    template &lt;typename View&gt; void runTest(View);
+
+    // WebKitAgnosticTest
+    virtual void didLoadURL(WebView *webView) { runTest(webView); }
+    virtual void didLoadURL(WKView *wkView) { runTest(wkView); }
+
+    virtual NSURL *url() const { return [[NSBundle mainBundle] URLForResource:@&quot;attributedStringStrikethrough&quot; withExtension:@&quot;html&quot; subdirectory:@&quot;TestWebKitAPI.resources&quot;]; }
+};
+
+template &lt;typename View&gt;
+void AttributedStringTest_Strikethrough::runTest(View view)
</ins><span class="cx"> {
</span><del>-    RetainPtr&lt;WebView&gt; webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
-    RetainPtr&lt;AttributedStringTest&gt; testController = adoptNS([AttributedStringTest new]);
-    
-    webView.get().frameLoadDelegate = testController.get();
-    [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@&quot;attributedStringCustomFont&quot; withExtension:@&quot;html&quot; subdirectory:@&quot;TestWebKitAPI.resources&quot;]]];
-    
-    Util::run(&amp;didFinishLoad);
-    didFinishLoad = false;
-        
-    NSAttributedString *attrString = [(NSView &lt;NSTextInput&gt; *)[[[webView.get() mainFrame] frameView] documentView] attributedSubstringFromRange:NSMakeRange(0, 5)];
</del><ins>+    NSAttributedString *attrString = attributedString(view, NSMakeRange(0, 5));
</ins><span class="cx"> 
</span><span class="cx">     EXPECT_WK_STREQ(&quot;Lorem&quot;, [attrString string]);
</span><ins>+    
+    NSDictionary *attributes = [attrString attributesAtIndex:0 effectiveRange:0];
+    ASSERT_NOT_NULL([attributes objectForKey:NSStrikethroughStyleAttributeName]);
+    ASSERT_TRUE([[attributes objectForKey:NSStrikethroughStyleAttributeName] isKindOfClass:[NSNumber class]]);
+    ASSERT_EQ(NSUnderlineStyleSingle, [(NSNumber *)[attributes objectForKey:NSStrikethroughStyleAttributeName] intValue]);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-TEST(WebKit2, AttributedStringTest)
</del><ins>+TEST_F(AttributedStringTest_Strikethrough, WebKit)
</ins><span class="cx"> {
</span><del>-    WKRetainPtr&lt;WKContextRef&gt; context(AdoptWK, WKContextCreate());
-    PlatformWebView webView(context.get());
-    
-    WKPageLoaderClient loaderClient;
-    memset(&amp;loaderClient, 0, sizeof(loaderClient));
-    loaderClient.version = 0;
-    loaderClient.didFinishLoadForFrame = didFinishLoadForFrame;
-    WKPageSetPageLoaderClient(webView.page(), &amp;loaderClient);
-    
-    WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource(&quot;attributedStringCustomFont&quot;, &quot;html&quot;)).get());
</del><ins>+    runWebKit1Test();
+}
</ins><span class="cx"> 
</span><del>-    Util::run(&amp;didFinishLoad);
-    didFinishLoad = false;
-    
-    NSRange range = NSMakeRange(0, 5);
-    NSRange actualRange;
-    NSAttributedString *attrString = [webView.platformView() attributedSubstringForProposedRange:range actualRange:&amp;actualRange];
-
-    EXPECT_WK_STREQ(&quot;Lorem&quot;, [attrString string]);
</del><ins>+TEST_F(AttributedStringTest_Strikethrough, WebKit2)
+{
+    runWebKit2Test();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-    
</del><span class="cx"> } // namespace TestWebKitAPI
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsmacattributedStringStrikethroughhtml"></a>
<div class="addfile"><h4>Added: trunk/Tools/TestWebKitAPI/Tests/mac/attributedStringStrikethrough.html (0 => 153344)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/mac/attributedStringStrikethrough.html                                (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/mac/attributedStringStrikethrough.html        2013-07-25 20:52:59 UTC (rev 153344)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+&lt;html&gt;
+    &lt;head&gt;
+        &lt;style&gt;
+        &lt;/style&gt;
+    &lt;/head&gt;
+    &lt;body contenteditable style=&quot;text-decoration: line-through;&quot;&gt;Lorem Ipsum
+        &lt;script&gt;
+            document.body.focus();
+        &lt;/script&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre>
</div>
</div>

</body>
</html>